<template>
  <div class="analysis">
    <a-card ref="card" :bordered="false" :style="{height:height+'px'}">
      <h1 style="width:300px;margin:100px auto 100px;font-weight: 900;font-size:18px;" >
        欢迎进入:{{userinfo.nickname}}
      </h1>
    </a-card>
  </div>
</template>

<script>

import { mapGetters } from 'vuex'

export default {
  name: 'Analysis',
  data() {
    return {
      loading: true,
      height: 500
    }
  },
  computed: {
    ...mapGetters(['userinfo'])
  },
  mounted() {
    setTimeout(() => {
      this.setTableHeight()
    }, 200)
  },
  methods: {
    setTableHeight() { // 设置页面表格高度
      if (this.$refs.card) {
        const clientHeight = document.documentElement.clientHeight
        const tableTop = this.$refs.card.$el.getBoundingClientRect().top
        this.height = clientHeight - tableTop - 40
      }
    }
  }
}
</script>

<style lang="less" scoped>
  .extra-wrap{
    .extra-item{
      display: inline-block;
      margin-right: 24px;
      a:not(:first-child){
        margin-left: 24px;
      }
    }
  }
  @media screen and (max-width: 992px){
    .extra-wrap .extra-item{
      display: none;
    }
  }
  @media screen and (max-width: 576px){
    .extra-wrap{
      display: none;
    }
  }

</style>
